<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:p="http://primefaces.prime.com.tr/ui">

	<ui:composition>
		
		<header>
			<h2>Profile Management</h2>
		</header>
		<h:form id="change-password-form" styleClass="table_box">
		<h3>Change Password</h3>
		<rich:graphValidator id="check_password">
			<table width="100%" cellspacing="5" cellpadding="0" border="0">
				<tbody>
					<tr>
						<td align="right" width="200px"></td>
						<td>
							<div class="table_td_message"><rich:message for="check_password" /></div>
						</td>
					</tr>
					<tr>
						<td align="right">New Password*:</td>
						<td>
							<h:inputSecret value="#{mAccount.new_password}" id="new_pass" validator="#{mValidatorLib.PasswordValidate}" />
							<div class="table_td_message"><rich:message for="new_pass" /></div>
						</td>
					</tr>
					<tr>
						<td align="right">Re-type Password*:</td>
						<td>
							<h:inputSecret value="#{mAccount.confirm_password}" id="retype_pass" />
							<div class="table_td_message"><rich:message for="retype_pass" /></div>
						</td>
					</tr>
					<tr>
						<td align="right"></td>
						<td>
							<h:commandLink action="#{mAccount.updateStaffPassword}" styleClass="button" value="Change My Password" />
						</td>
					</tr>
				</tbody>
			</table> 
		</rich:graphValidator>
		</h:form>
		
		<h:form id="change-info-form" styleClass="table_box">
			<h3>Privacy Information</h3>		
			<rich:graphValidator id="uinfo">
				<table width="100%" cellspacing="5" cellpadding="0" border="0">
					<tbody>
						<tr>
							<td align="right"></td>
							<td>
								
								<div class="table_td_message"><rich:message for="uinfo" /></div>
							</td>
						</tr>
						<tr>
							<td align="right"  width="200px">Owner's Name:</td>
							<td>
								<h:inputText value="#{mAccount.stf.fullname}"  style="text-transform:uppercase;font-weight:bold;" id="acc_name"/>
								<div class="table_td_message"></div>
							</td>
						</tr>
						<tr>
							<td align="right">Email:</td>
							<td>
								<h:outputText value="#{mAccount.stf.email}"  style="font-weight:bold;" id="acc_email"/>
								<div class="table_td_message"></div>
							</td>
						</tr>
						
						<tr>
							<td align="right">&nbsp;</td>
							<td>
								<h:commandLink status="info_form_status" action="#{mAccount.updateStaffInfo}" styleClass="button" value="Update My Information" />
							</td>
						</tr>
					</tbody>
				</table>
			</rich:graphValidator>				
		</h:form>
		
		
	</ui:composition>
</html>